import { request, hotelRequest ,otherRequest} from '@/sheep/request';

export default {




    // 奖品列表
    poolDetail: (params) =>
        request({
            url: '/shop/api/lottery/pool/poolDetail',
            method: 'GET',
            params,
        }),

    // 开奖
    open: (data) =>
        request({
            url: '/shop/api/lottery/pool/open',
            method: 'POST',
            data: {
                ...data,
            },
        }),


    //获取二维码 邀请码
    getUserQrCode: (params) =>
        request({
            url: '/user/api/QrCode/getUserQrCode',
            method: 'GET',
            params,
        }),
    showLoadingGetUserQrCode: (params) =>
        request({
            url: '/user/api/QrCode/getUserQrCode',
            method: 'GET',
            params,
            custom: {
                showLoading: false,
            },
        }),

    // 开奖
    bind: (data) =>
        request({
            url: '/user/api/team/bind',
            method: 'POST',
            data,
        
        }),


    //查询邀请列表
    invite: (params) =>
        request({
            url: '/user/api/team/invite',
            method: 'GET',
            params,
        }),

    // 往期记录select
    getPreStageSelect: (params) =>
        request({
            url: '/lottery/api/index/periods',
            method: 'GET',
            params,
        }),
    
    // 奖池奖品记录
    getPoolLotteryList: (params) =>
        request({
            url: '/lottery/api/index/pool',
            method: 'GET',
            params,
        }),

    // 往期中奖记录
    getPrevLotteryRecord: (params) =>
        request({
            url: '/lottery/api/index/openLog',
            method: 'GET',
            params,
        }),

        // 用户抢红包记录
    getUserLotteryLog: (params) =>
        request({
            url: '/lottery/api/index/userLotteryLog',
            method: 'GET',
            params,
        }),

        
        // 团购商品列表
    tgGoodsList: (params) =>
        otherRequest({ 
            url: '/group/api/tg/goods/list',
            method: 'GET',
            params,
        }),
	// 团购标签列表
	tgTagList: (params) =>
		otherRequest({ 
			url: '/group/api/tg/goods/tag_list',
			method: 'GET',
			params,
		}),
	// 团购特价列表
	getBargingList: (params) =>
		otherRequest({ 
			url: '/group/api/tg/goods/get_barging_list',
			method: 'POST',
			params,
		}),
	// 社群商品接口
	getgoodsList: (params) =>
		request({
			baseURL:'https://sns-beta-huanglv.shisan-xi.work',
			url: '/api/goods/goodsList',
			method: 'GET',
			params,
			custom: {
			     platform: 'storeList',
				 showError:false
			},
		}),
	// 社群团购商品
	getgroupList: (params) =>
		request({
			baseURL:'https://sns-beta-huanglv.shisan-xi.work',
			url: '/api/goods/groupList',
			method: 'GET',
			params,
			custom: {
			    platform: 'storeList',
				showError:false
			},
		}),
	// 社群门店接口
	getstoreList: (params) =>
		request({
			baseURL:'https://sns-beta-huanglv.shisan-xi.work',
			url: '/api/goods/storeList',
			method: 'GET',
			params,
			custom: {
			     platform: 'storeList',
				 showError:false
			},
		}),
		
	// 实时抽红包首页
	shoppoolindex: (params) =>
		request({
			baseURL:'https://api-prod-xyh.jingxishenghuo1688.com/',
			url: '/shop/api/lottery/pool/index',
			method: 'GET',
			params,
		}),
		
	// 实时抽红包
	shoppoolbuyRedBag: (data) =>
		request({
			baseURL:'https://api-prod-xyh.jingxishenghuo1688.com/',
			url: '/shop/api/lottery/pool/buyRedBag',
			method: 'POST',
			custom: {
				showError:false
			},
			data,
		}),
		
	// 实时抽红包记录
	shoppoolbuyRedBagLog: (params) =>
		request({
			baseURL:'https://api-prod-xyh.jingxishenghuo1688.com/',
			url: '/shop/api/lottery/pool/buyRedBagLog',
			method: 'GET',
			params,
		}),
		
	// 获取订单类型
	shoppoolorderType: (params) =>
		request({
			baseURL:'https://api-prod-xyh.jingxishenghuo1688.com/',
			url: '/shop/api/lottery/pool/orderType',
			method: 'GET',
			params,
			custom: {
				showError:false
			},
		}),



};
